# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ovos-audio
pkgver=0.0.2_alpha13
pkgrel=0
pkgdesc="ovos-core metapackage for audio daemon "
url="https://github.com/OpenVoiceOS/ovos-audio"
arch="noarch !s390x" # blocked by py3-ovos-ocp-audio-plugin
license="Apache-2.0"
depends="
	py3-ovos-bus-client
	py3-ovos-config
	py3-ovos-ocp-files-plugin
	py3-ovos-ocp-m3u-plugin
	py3-ovos-ocp-news-plugin
	py3-ovos-ocp-rss-plugin
	py3-ovos-ocp-audio-plugin
	py3-ovos-plugin-manager
	py3-ovos-tts-plugin-mimic3-server
	py3-ovos-utils
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenVoiceOS/ovos-audio/archive/refs/tags/V${pkgver//_alpha/a}.tar.gz"
builddir=$srcdir/ovos-audio-${pkgver//_alpha/a}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ff87bc8506843825a2766932f0b83a4ba72754e175d94175c01fb772193ef9372130807e7d5d931f5ba3ef406b522a094d4a965f5a05926ccda8d308f36d4d69  ovos-audio-0.0.2_alpha13.tar.gz
"
